package cn.com.winning.ecare.activity;

import cn.com.winning.ecare.common.MyApplication;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.view.Window;
import android.widget.Button;
import android.widget.ImageButton;
import android.widget.ImageView;
import android.widget.TextView;

/**医生信息
 * @author Administrator
 *
 */
public class HospitalFive extends Activity
{
	private HospitalFive oThis = this;
	private String stryssx;
	private String strys;
	private String strystc;
	private String strysdj;
	private Intent mIntent;
	private ImageButton imb;
	private TextView tv, ys_name, tv_ys, tv_hosContent;
	private Button ys_dj;
	private ImageView img;
	private ImageButton mainselected;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.hospital_five);
		MyApplication myApplication;
		myApplication = (MyApplication) getApplication();
		myApplication.addActivity(this);
		// 获取控件
		findView();
	}

	private void findView()
	{
		imb = (ImageButton) findViewById(R.id.backmenuButton);
		tv = (TextView) findViewById(R.id.ysname);
		ys_name = (TextView) findViewById(R.id.ys_name);
		ys_dj = (Button) findViewById(R.id.ys_dj);
		tv_ys = (TextView) findViewById(R.id.gh_ys);
		tv_hosContent = (TextView) this.findViewById(R.id.ys_content);
		img = (ImageView) this.findViewById(R.id.ys_img);
		mIntent = getIntent();
		mainselected = (ImageButton) this.findViewById(R.id.mainselected);

		if (mIntent != null)
		{
			if (mIntent.getParcelableExtra("BITMAP") != null)
			{
				Bitmap bitmap = (Bitmap) getIntent().getParcelableExtra("BITMAP");
				img.setImageBitmap(bitmap);
			}
			stryssx = mIntent.getStringExtra("stryssx");
			strys = mIntent.getStringExtra("strys");
			strysdj = mIntent.getStringExtra("strysdj");
			strystc = mIntent.getStringExtra("strystc");
		}
		tv.setText(strys);
		ys_name.setText(strys);
		ys_dj.setText("  " + strysdj + "  ");
		tv_ys.setText(strystc);
		tv_hosContent.setText(stryssx);
		imb.setOnClickListener(new View.OnClickListener()
		{

			@Override
			public void onClick(View v)
			{
				// TODO Auto-generated method stub
				finish();

			}
		});
		mainselected.setOnClickListener(new OnClickListener()
		{

			@Override
			public void onClick(View view)
			{
				// TODO Auto-generated method stub
				Intent intent = new Intent();
				intent.setClass(oThis, Mainmean.class);
				startActivity(intent);
				oThis.finish();
			}
		});

	}

}
